import { defineStore } from 'pinia'
import { reactive } from 'vue'

interface ListType {
    author: string
    datetime: string
    description: string
    id: string
    image: string
    title: string
}

export default defineStore('demo', () => {
    const state: any = reactive({
        list: []
    })

    const setList = (list: ListType) => {
        state.list = list
    }

    return {
        state,
        setList
    }
}, {
    persist: true
})